# -*- coding:utf-8 -*-
# @Author: shenyuyu
# @Time: 2023/6/15 10:13
# @File: 继承.py

class Animal:
    def __init__(self, name):
        self.name = name

    def eat(self):
        print("吃东西")


class Dog(Animal):
    pass


if __name__ == "__main__":
    d = Dog("tom")
    print(d.name)
    d.eat()
